import { Outlet } from "react-router-dom"
import { Suspense } from "react"
// 公共组件（直接导入，无需懒加载）
import Navbar from '@/components/Navbar';
import Footer from '@/components/Footer';
import Header from '@/components/Header';
import Loading from '@/components/Loading'; // 懒加载占位组件
export default function  InitApp(){
    return (
        <div className="flex column comm-content">
            <Header />
            <main className="flex flex-1 overflow-x">
                <Navbar />
                <div className="flex-1 flex column overflow-x">
                    <section className="flex-1 overflow-x pd-10">
                        <Suspense fallback={<Loading />}>
                            {/* 子路由内容渲染出口 */}
                            <Outlet />
                        </Suspense>
                    </section>
                    <Footer />
                </div>
            </main>
        </div>
       
    )
}